using System;
using UnityEngine;

[Serializable]
public class MarketParts : MonoBehaviour
{
	public string partID;

	public int partPrice;

	public GameObject bought;

	public GameObject nam;

	private float updateInterval;

	private float timeleft;

	public MarketParts()
	{
		partID = string.Empty;
		updateInterval = 0.3f;
	}

	public void Start()
	{
		timeleft = updateInterval;
	}

	public void Update()
	{
		timeleft -= Time.deltaTime;
		if (!(timeleft > 0f) && (bool)bought)
		{
			if (PlayerPrefs.GetInt(partID) == 1)
			{
				bought.active = true;
				nam.active = false;
			}
			else
			{
				bought.active = false;
			}
			timeleft = updateInterval;
		}
	}

	public void Main()
	{
	}
}
